<?php
/**
 # mod_megabannerslider - Mega Banner Slider Module for Joomla! 1.7
 # author 		OmegaTheme.com
 # copyright 	Copyright(C) 2011 - OmegaTheme.com. All Rights Reserved.
 # @license 	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 # Website: 	http://omegatheme.com
 # Technical support: Forum - http://omegatheme.com/forum/
**/
/**------------------------------------------------------------------------
 * file: mod_megabannerslider.php 1.7.0 00001, March 2011 12:00:00Z OmegaTheme $
 * package:	 Mega Banner Slider Module
 *------------------------------------------------------------------------*/
//No direct access!
defined( "_JEXEC" ) or die;

require_once (dirname(__FILE__).DS.'helper.php');

/* Get module parameters */
$doc = &JFactory::getDocument();
$doc->addStyleSheet(JURI::root().'modules/mod_megabannerslider/css/layout.css');
if ($params->get('load_jquery', 1) == 1) {
	$doc->addScript(JURI::root().'modules/mod_megabannerslider/js/jquery.js');
}
$doc->addScript(JURI::root().'modules/mod_megabannerslider/js/jquerycycle.js');

$type = explode(',',trim($params->get('type')));

$folder	= modMegaBannerSliderHelper::getFolder($params);
$images	= modMegaBannerSliderHelper::getImages($params, $folder, $type);

$sliderWidth    = 	$params->get('width', 600);
$sliderHeight   = 	$params->get('height', 250);

if (!count($images)) {
	echo JText::_( 'No images ');
	return;
}

require(JModuleHelper::getLayoutPath('mod_megabannerslider'));
?>